package com.Smallchangesys.prove.aaa;


//懒汉式
class Lazy{
    private String name;

    private Lazy(String name){
        this.name = name;
    }

    private static Lazy lazy;

    public static Lazy PrintName(){
        if(lazy == null){
            lazy = new Lazy("Hungry");
        }
        return lazy;
    }

}

public class qqq {
    public static void main(String[] args) {
        Lazy printName = Lazy.PrintName();
        System.out.println(printName);
        System.out.println();

    }
}
